package cc.chenwenxi.mypi.appium;

import cc.chenwenxi.mypi.appium.entity.app.掘金;
import cc.chenwenxi.mypi.appium.kits.AppiumUtils;
import cn.hutool.extra.spring.SpringUtil;
import io.appium.java_client.android.AndroidDriver;
import org.mapdb.DB;
import org.mapdb.HTreeMap;

import java.util.Date;

public class 掘金AppiumTask implements AppiumTask {

    private final AndroidDriver driver;
    private final AppiumUtils kit;

    private final DB mapDb;

    private final String pre = "巴乐兔_";
    private final HTreeMap<String, Boolean> hash;


    public 掘金AppiumTask(AndroidDriver driver) {
        this.driver = driver;
        this.kit = new AppiumUtils(driver);
        this.mapDb = SpringUtil.getBean(DB.class);
        this.hash = (HTreeMap<String, Boolean>) mapDb.hashMap("baletu").createOrOpen();
    }

    @Override
    public String appName() {
        return null;
    }

    @Override
    public boolean isNeedRun() {
        return false;
    }

    @Override
    public void run(Date endTime) {

    }

    @Override
    public void openActivity() {
        driver.startActivity(掘金.mainActivity);
    }

    @Override
    public void checkAndInstallApk() {

    }
}
